<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s"  uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML>
  <head>
    <base href="<%=basePath%>">
    
    <link rel="stylesheet" href="assets/plugins/kindeditor/themes/default/default.css" />
	<link rel="stylesheet" href="assets/plugins/kindeditor/plugins/code/prettify.css" />
	<script charset="utf-8" src="assets/plugins/kindeditor/kindeditor.js"></script>
	<script charset="utf-8" src="assets/plugins/kindeditor/lang/zh_CN.js"></script>
	<script charset="utf-8" src="assets/plugins/kindeditor/plugins/code/prettify.js"></script>
    
   
  	<style type="text/css">
  		body{
  			margin:0 auto;
  			font-size:12px;
  		}
  		.mainbox{
  			width:950px;
  			margin:5em auto;
  			
  		}
  		.anews{
  			margin:5em 2px;
  		}
  		#leftColumn {
  			width:70%;
  			float:left;
  		}
  		#rightColumn{
  			width:27%;
  			float:right;
  			background:#DDDDDD;
  			height:300px; 			
  		}
  		.listHeader{
  			background:#D8E4EF;
  			height:2em;
  			margin-bottom:2em;
  		}
  		.title{
  			text-align:center;
  			color:#4359DF;
  			line-height:25px;
  		}
  		.newsinfo{
  			margin-top:5px;
  			margin-bottom:3px;
  		}
  		
  		.content{
  			margin-bottom:2em;
  		}
  		.author{
  			width:150px;
  			float:left;
  		}
  		.source {
  			width:150px;
  			float:left;
  		}	
  		.postdate{
  			width:150px;
  			float:left;
  		}
  	</style>
  	<script type="text/javascript"> 
		$(document).ready(function(){
			prettyPrint();
		});
  	</script>
  </head>
  
  <body onload="prettyPrint()">
  		<div class="mainbox">
  			<div id="leftColumn">
    		<s:iterator value="newslist" id="anews">
    			<div class="anews">
    					<div class="listHeader">
    			 			<h3 class="title"><s:property value="#anews.title" /></h3>
    			 		</div>
    			 		<div class="content">
    			 			<s:property value="#anews.content" escapeHtml="false"/>
    			 		</div>
    			 		<div class="newsinfo">
    			 			<div class="author">
	    			 			作者
	    			 			<span><s:property value="#anews.author"/>
    			 			</div>
    			 			<div class="source">
    			 				来源于
    			 				<span><s:property value="#anews.source"/></span>
    			 			</div>
    			 			<div class="postdate">
    			 				<span><s:date name="#anews.postdate" format="yyyy-MM-dd HH:mm:ss" /></span>
    			 			</div>
    			 		</div>
    			</div>
    		</s:iterator>
   			</div>
   			<div id="rightColumn">
   				
   			</div>
   		</div>
    <s:debug></s:debug>
  </body>
</html>
